home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 May
/
Ahoy_Magazine_85-05_1985_Double_L.d64
/
fast menu 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
74 lines
5 print"[147]":poke53280,0:poke53281,6:poke646,7
7 rem
8 rem disable run/stop and restore
9 rem
10 poke 792,193:poke 808,239:poke 657,128
20 dim v$(23)
27 rem
28 rem set v$() to row numbers
29 rem
30 v$(0)="":for i=1 to 23:v$(i)=v$(i-1)+"":next
37 rem
38 rem set old and new color locations and color strings
40 np=2:xp=0:xc$="[158],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
41 hc$=""+right$(xc$,39)
47 rem
48 rem print the menu
49 rem
50 cr$=chr$(13):print "[147] choose your sandwich"
51 print " f5=up f7=down space=choice"
52 print cr$"***********************"cr$"* *"
53 print "* roast beef *"cr$"* corned beef *"
54 print "* shaved ham *"cr$"* pastrami *"
55 print "* turkey & salami *"cr$"* *"
56 print "***********************"cr$cr$cr$cr$cr$cr$
57 print " press run/stop[146] to quit";
60 gosub 900:xp=np
97 rem
98 rem read keyboard
99 rem
100 a=peek(197):if a=64 then 100
107 rem
108 rem quit?
109 rem
110 if a=63 then 800
117 rem
118 rem choice made?
119 rem
120 if a=60 then gosub 200:goto 100
127 rem
128 rem move up?
129 rem
130 if a=6 then np=np-1:if np<0 then np=4
137 rem
138 rem move down?
139 rem
140 if a=3 then np=np+1:if np>4 then np=0
147 rem
148 rem if move, go do it
149 rem
150 if np<>xp then gosub 900:xp=np
160 poke 197,64:goto 100
200 if peek(197)<>64 then 200
207 rem
208 rem clear old choice
209 rem
210 print "you chose:"cr$" [145]"
217 rem
218 rem jump table
219 rem
220 on np+1 goto 300,400,500,600,700
300 print "roast beef on wheat":return
400 print "corned beef on rye":return
500 print "shaved ham on a croissant":return
600 print "pastrami on toast":return
700 print "turkey & salami on roll":return
797 rem
798 rem restore and end
799 rem
800 if peek(197)<>64 then 800
810 print "[147]":poke 792,71:poke 808,237:poke 657,0:poke 198,0:end
897 rem
898 rem print colors using false screen memory
900 poke 648,60:print v$(np+5)hc$v$(xp+5)xc$:poke 648,4:return